#include "transseries.h"

#include <iostream>

TransSeries::TransSeries(QString Name)
    :name(Name)
    ,heigh(0)
    ,series()
{

}

TransSeries::TransSeries(const TransSeries &Series) {
    name = Series.name;
    heigh = Series.getHeigh();

    QVector<Transaction>::ConstIterator i = Series.getSeries().constBegin();
    while (i != Series.getSeries().constEnd()) {
        series.append(*i);
        i++;
    }
}

TransSeries::TransSeries()
    :name("TransSeries")
    ,heigh(0)
    ,series()
{

}

TransSeries::~TransSeries() {
    std::cout << "TransSereis delete : " << std::hex << (unsigned long long) (this) << std::endl;
}

void TransSeries::addTransaction(const Transaction &transaction) {
    series.append(transaction);
}

const QVector<Transaction>& TransSeries::getSeries() const {
    return series;
}

void TransSeries::setHeigh(int Heigh) {
    heigh = Heigh;
}


int TransSeries::getHeigh() const {
    return heigh;
}
